package com.hongxun.design.utils;

import android.text.Spannable;
import android.text.SpannableString;
import android.text.style.ForegroundColorSpan;
import android.widget.TextView;

import com.hongxun.design.R;

/**
 * Created by zerdoor_pc on 2016/5/11.
 * TextView操作类
 */
public class TextViewUtil {
    static TextViewUtil intence;

    public static TextViewUtil getintence() {
        if (intence == null) {
            intence=new TextViewUtil();
        }
        return intence;
    }

    public static void setAppendWordsColor(TextView textView,String value,int first,int end){
        SpannableString sp = new SpannableString(value);
        sp.setSpan(new ForegroundColorSpan(R.color.blue), first, end, Spannable.SPAN_EXCLUSIVE_INCLUSIVE);
        textView.append(sp);

    }
}
